package com.ruoyi.shop.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shop.mapper.MetaverseShopMapper;
import com.ruoyi.shop.domain.MetaverseShop;
import com.ruoyi.shop.service.IMetaverseShopService;

import javax.annotation.Resource;

/**
 * 店铺Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-30
 */
@Service
public class MetaverseShopServiceImpl implements IMetaverseShopService 
{
    @Resource
    private MetaverseShopMapper metaverseShopMapper;

    /**
     * 查询店铺
     * 
     * @param shopId 店铺主键
     * @return 店铺
     */
    @Override
    public MetaverseShop selectMetaverseShopByShopId(Long shopId)
    {
        return metaverseShopMapper.selectMetaverseShopByShopId(shopId);
    }

    /**
     * 查询店铺列表
     * 
     * @param metaverseShop 店铺
     * @return 店铺
     */
    @Override
    public List<MetaverseShop> selectMetaverseShopList(MetaverseShop metaverseShop)
    {
        return metaverseShopMapper.selectMetaverseShopList(metaverseShop);
    }

    /**
     * 新增店铺
     * 
     * @param metaverseShop 店铺
     * @return 结果
     */
    @Override
    public int insertMetaverseShop(MetaverseShop metaverseShop)
    {
        metaverseShop.setCreateTime(DateUtils.getNowDate());
        return metaverseShopMapper.insertMetaverseShop(metaverseShop);
    }

    /**
     * 修改店铺
     * 
     * @param metaverseShop 店铺
     * @return 结果
     */
    @Override
    public int updateMetaverseShop(MetaverseShop metaverseShop)
    {
        metaverseShop.setUpdateTime(DateUtils.getNowDate());
        return metaverseShopMapper.updateMetaverseShop(metaverseShop);
    }

    /**
     * 批量删除店铺
     * 
     * @param shopIds 需要删除的店铺主键
     * @return 结果
     */
    @Override
    public int deleteMetaverseShopByShopIds(Long[] shopIds)
    {
        return metaverseShopMapper.deleteMetaverseShopByShopIds(shopIds);
    }

    /**
     * 删除店铺信息
     * 
     * @param shopId 店铺主键
     * @return 结果
     */
    @Override
    public int deleteMetaverseShopByShopId(Long shopId)
    {
        return metaverseShopMapper.deleteMetaverseShopByShopId(shopId);
    }

    @Override
    public MetaverseShop selectMetaverseShopListWu(Long groupId) {
        return metaverseShopMapper.selectMetaverseShopListWu(groupId);
    }

    @Override
    public List<MetaverseShop> selectMetaverseShopListAop(Long groupId) {
        return metaverseShopMapper.selectMetaverseShopListAop(groupId);
    }

}
